Objects Reference

bsp_object::ray_intersect_test

Prototype

virtual int ray_intersect_test(vector& ro,vector& rd,float rad=0.0f)

Parameters

Parameter Type Description
ro vector& ray origin
rd vector& ray_direction
rad float radius of collision

Return Value

Returns TRUE on any intersection, FALSE for no intersection.

Remarks

This virtual function implements the ray intersection test with the object. It should return the first collision (not necessarily closest).

Its default behavior is to call get_mesh and if a mesh is returned, it calls the mesh ray_intersect_test.